<?php
namespace app\common\model\customer;
use think\Model;
use app\api\controller\Pub;

class CustomerProjectType extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'customer_project_type';
    protected $pk    = 'Id';

    const STATEINT    = 1; //可以创建
    const STATENOCREATE   = 2; //不可以创建

    /**
     * 获取可以创建的项目分类
     * @return [type] [description]
     */
    public static function  getcreatelist(){
        $data = CustomerProjectType::where('State','<>',CustomerProjectType::STATENOCREATE)->visible(['Id','Name'])->select()->toArray();
        return $data;
    }

}
